package com.taotao.wifepojie.service.impl;

import com.taotao.wifepojie.mapper.UserMapper;
import com.taotao.wifepojie.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private JdbcTemplate jdbcTemplate;
     @Autowired
     private UserMapper userMapper;
    @Override
    public Boolean inserUser(String name, Integer age) {
       /* int update = jdbcTemplate.update("insert into users values(?,?);", name, age);*/
        int update=userMapper.insert(name,age);
        return update > 0 ? true : false;
    }
}
